<nav aria-label="...">

    <ul class="pagination">
        {% if cur_page_objects.has_previous %}
            <li><a class="previous-page" href="?page={{ cur_page_objects.previous_page_number }}">
                上一页
            </a></li>
        {% endif %}
        {% if first_page == current_page %}
            <li class="active"><a href="?page=1">1</a></li>
        {% else %}
            <li><a href="?page=1" class="first-page">1</a></li>
        {% endif %}

        {% if left_dot %}
            <li><span>...</span></li>
        {% endif %}
        {% for page in pages %}
            {% if page == current_page %}
                <li class="active"><span class="current">{{ page }}</span></li>
            {% else %}
                <li><a href="?page={{ page }}">{{ page }}</a></li>
            {% endif %}
        {% endfor %}
        {% if right_dot %}
            <li><span>...</span></li>
        {% endif %}
        {% if last_page != 1 %}
            {% if last_page == current_page %}
                <li class="active"><span>{{ last_page }}</span></li>
            {% else %}
                <li><a href="?page={{ last_page }}">{{ last_page }}</a></li>
            {% endif %}
        {% endif %}
        {% if cur_page_objects.has_next %}
            <li><a class="next-page" href="?page={{ cur_page_objects.next_page_number }}">下一页</a></li>
        {% endif %}
    </ul>
</nav>